from django.contrib import admin
from forum.models import LoginUser, Nav, Column, PostType, Post, Comment, Message, Application, Notice

from forum.models import Book

# Register your models here.

admin.site.register(LoginUser)
admin.site.register(Nav)
admin.site.register(Column)
admin.site.register(PostType)
admin.site.register(Post)
admin.site.register(Comment)
admin.site.register(Message)
admin.site.register(Application)
admin.site.register(Notice)


# 以下是测试
class BookManager(admin.ModelAdmin):
    list_display = ['id', 'name', 'money']  # 显示列表字段名

    list_filter = ['money']  # 过滤器
    search_fields = ['money', 'name','id']  # 搜索框 按字段
    list_editable = ['money', 'name', ]  # 开启可编辑的列表  按字段


admin.site.register(Book, BookManager)
